
package com.nvlled.route;

public class RequestInfo<T extends RoutedObject> {

    int numReplies;
    long maxWait; // milliseconds
    boolean byId;
    Class aClass;

    public RequestInfo(T obj, int numReplies, long maxWait, boolean byId) {
        this(obj.getClass(), numReplies, maxWait, byId);
    }

    public RequestInfo(Class aClass, int numReplies, long maxWait) {
        this(aClass, numReplies, maxWait, false);
    }

    public RequestInfo(Class aClass, int numReplies, long maxWait, boolean byId) {
        this.aClass = aClass;
        this.numReplies = numReplies;
        this.maxWait = maxWait;
        this.byId = byId;
    }

    public Class getType() {
        return aClass;
    }

    public int getNumReplies() {
        return numReplies;
    }

    public long getMaxWait() {
        return maxWait;
    }

    public boolean isById() {
        return byId;
    }
}

